<template>
<div>
  <div>
    <table>
      <tr>
        <th>编号</th>
        <th>图片</th>
        <th>名称</th>
        <th>标签</th>
      </tr>
      <tr v-for="(item,index) in list" :key="item.id">
        <td>{{ index+1 }}</td>
        <td ><img :src="item.img" width="100px" height="100px"></td>
        <td>{{ item.name }}</td>
        <td><MyBuy v-model="tempText"></MyBuy></td>
      </tr>
    </table>
  </div>
</div>
</template>
<style>

</style>
<script>
import MyBuy from './components/MyBuy.vue';
export default {
  data(){
    return {
      //测试组件功能的临时数据
      tempText:'插画',
      list :[
        { id: 1,img:"https://bpic.588ku.com/element_origin_min_pic/23/07/11/d32dabe266d10da8b21bd640a2e9b611.jpg!r650",name:'紫砂壶',table:'茶具'},
        { id: 3,img:"https://bpic.588ku.com/element_origin_min_pic/23/07/11/d32dabe266d10da8b21bd640a2e9b611.jpg!r650",name:'紫砂壶',table:'茶具'},
        { id: 4,img:"https://bpic.588ku.com/element_origin_min_pic/23/07/11/d32dabe266d10da8b21bd640a2e9b611.jpg!r650",name:'紫砂壶',table:'茶具'},
        { id: 2,img:"https://bpic.588ku.com/element_origin_min_pic/23/07/11/d32dabe266d10da8b21bd640a2e9b611.jpg!r650",name:'紫砂壶',table:'茶具'},
      ]
    }
  },
  components:{
    MyBuy
  }
}
</script>